import React from 'react'

const messageDetails = [
    {id: 1, title: 'Message001', content: '牛逼啊, 中国'},
    {id: 3, title: 'Message003', content: '牛逼啊, 达少'},
    {id: 5, title: 'Message003', content: '牛逼啊, Joker'},
    {id: 6, title: 'Message006', content: '牛逼啊, 少年'},
];

export default function MessageDetail(props) {

    const id = props.match.params.id;
    const message = messageDetails.find(m => m.id === id * 1);

    return (
        <ul>
            <li>ID: {message.id}</li>
            <li>TITLE: {message.title}</li>
            <li>CONTENT: {message.content}</li>
        </ul>
    )
}